_CUSTOM_META(DRM_IOCTL_VERSION, DRM_IOWR(0x00, FEX::HLE::x32::DRM::fex_drm_version))
_CUSTOM_META(DRM_IOCTL_GET_UNIQUE, DRM_IOWR(0x01, FEX::HLE::x32::DRM::fex_drm_unique))
_BASIC_META(DRM_IOCTL_GET_MAGIC)
_BASIC_META(DRM_IOCTL_IRQ_BUSID)
_CUSTOM_META(DRM_IOCTL_GET_MAP, DRM_IOWR(0x04, FEX::HLE::x32::DRM::fex_drm_map))
_CUSTOM_META(DRM_IOCTL_GET_CLIENT, DRM_IOWR(0x05, FEX::HLE::x32::DRM::fex_drm_client))
_CUSTOM_META(DRM_IOCTL_GET_STATS, DRM_IOR(0x06, FEX::HLE::x32::DRM::fex_drm_stats))
_BASIC_META(DRM_IOCTL_SET_VERSION)
_BASIC_META(DRM_IOCTL_MODESET_CTL)
_BASIC_META(DRM_IOCTL_GEM_CLOSE)
_BASIC_META(DRM_IOCTL_GEM_FLINK)
_BASIC_META(DRM_IOCTL_GEM_OPEN)
_BASIC_META(DRM_IOCTL_GET_CAP)
_BASIC_META(DRM_IOCTL_SET_CLIENT_CAP)

_CUSTOM_META(DRM_IOCTL_SET_UNIQUE, DRM_IOW(0x10, FEX::HLE::x32::DRM::fex_drm_unique))
_BASIC_META(DRM_IOCTL_AUTH_MAGIC)
_BASIC_META(DRM_IOCTL_BLOCK)
_BASIC_META(DRM_IOCTL_UNBLOCK)
_BASIC_META(DRM_IOCTL_CONTROL)
_CUSTOM_META(DRM_IOCTL_ADD_MAP, DRM_IOWR(0x15, FEX::HLE::x32::DRM::fex_drm_map))
_CUSTOM_META(DRM_IOCTL_ADD_BUFS, DRM_IOWR(0x16, FEX::HLE::x32::DRM::fex_drm_buf_desc))
_CUSTOM_META(DRM_IOCTL_MARK_BUFS, DRM_IOW(0x17, FEX::HLE::x32::DRM::fex_drm_buf_desc))
_CUSTOM_META(DRM_IOCTL_INFO_BUFS, DRM_IOWR(0x18, FEX::HLE::x32::DRM::fex_drm_buf_info))
_CUSTOM_META(DRM_IOCTL_MAP_BUFS, DRM_IOWR(0x19, FEX::HLE::x32::DRM::fex_drm_buf_map))
_CUSTOM_META(DRM_IOCTL_FREE_BUFS, DRM_IOW(0x1a, FEX::HLE::x32::DRM::fex_drm_buf_free))

_CUSTOM_META(DRM_IOCTL_RM_MAP, DRM_IOW(0x1b, FEX::HLE::x32::DRM::fex_drm_map))

_CUSTOM_META(DRM_IOCTL_SET_SAREA_CTX, DRM_IOW(0x1c, FEX::HLE::x32::DRM::fex_drm_ctx_priv_map))
_CUSTOM_META(DRM_IOCTL_GET_SAREA_CTX, DRM_IOWR(0x1d, FEX::HLE::x32::DRM::fex_drm_ctx_priv_map))

_BASIC_META(DRM_IOCTL_SET_MASTER)
_BASIC_META(DRM_IOCTL_DROP_MASTER)

_BASIC_META(DRM_IOCTL_ADD_CTX)
_BASIC_META(DRM_IOCTL_RM_CTX)
_BASIC_META(DRM_IOCTL_MOD_CTX)
_BASIC_META(DRM_IOCTL_GET_CTX)
_BASIC_META(DRM_IOCTL_SWITCH_CTX)
_BASIC_META(DRM_IOCTL_NEW_CTX)
_CUSTOM_META(DRM_IOCTL_RES_CTX, DRM_IOWR(0x26, FEX::HLE::x32::DRM::fex_drm_ctx_res))
_BASIC_META(DRM_IOCTL_ADD_DRAW)
_BASIC_META(DRM_IOCTL_RM_DRAW)
_CUSTOM_META(DRM_IOCTL_DMA, DRM_IOWR(0x29, FEX::HLE::x32::DRM::fex_drm_dma))
_BASIC_META(DRM_IOCTL_LOCK)
_BASIC_META(DRM_IOCTL_UNLOCK)
_BASIC_META(DRM_IOCTL_FINISH)

_BASIC_META(DRM_IOCTL_PRIME_HANDLE_TO_FD)
_BASIC_META(DRM_IOCTL_PRIME_FD_TO_HANDLE)

_BASIC_META(DRM_IOCTL_AGP_ACQUIRE)
_BASIC_META(DRM_IOCTL_AGP_RELEASE)
// XXX: _BASIC_META(DRM_IOCTL_AGP_ENABLE)
// XXX: _BASIC_META(DRM_IOCTL_AGP_INFO)
// XXX: _BASIC_META(DRM_IOCTL_AGP_ALLOC)
// XXX: _BASIC_META(DRM_IOCTL_AGP_FREE)
// XXX: _BASIC_META(DRM_IOCTL_AGP_BIND)
// XXX: _BASIC_META(DRM_IOCTL_AGP_UNBIND)

_CUSTOM_META(DRM_IOCTL_SG_ALLOC, DRM_IOWR(0x38, FEX::HLE::x32::DRM::fex_drm_scatter_gather))
_CUSTOM_META(DRM_IOCTL_SG_FREE, DRM_IOW(0x39, FEX::HLE::x32::DRM::fex_drm_scatter_gather))

_CUSTOM_META(DRM_IOCTL_WAIT_VBLANK, DRM_IOWR(0x3a, FEX::HLE::x32::DRM::fex_drm_wait_vblank))

_BASIC_META(DRM_IOCTL_CRTC_GET_SEQUENCE)
_BASIC_META(DRM_IOCTL_CRTC_QUEUE_SEQUENCE)

_CUSTOM_META(DRM_IOCTL_UPDATE_DRAW, DRM_IOW(0x3f, FEX::HLE::x32::DRM::fex_drm_update_draw))

_BASIC_META(DRM_IOCTL_MODE_GETRESOURCES)
_BASIC_META(DRM_IOCTL_MODE_GETCRTC)
_BASIC_META(DRM_IOCTL_MODE_SETCRTC)
_BASIC_META(DRM_IOCTL_MODE_CURSOR)
_BASIC_META(DRM_IOCTL_MODE_GETGAMMA)
_BASIC_META(DRM_IOCTL_MODE_SETGAMMA)
_BASIC_META(DRM_IOCTL_MODE_GETENCODER)
_BASIC_META(DRM_IOCTL_MODE_GETCONNECTOR)
_BASIC_META(DRM_IOCTL_MODE_ATTACHMODE)
_BASIC_META(DRM_IOCTL_MODE_DETACHMODE)

_BASIC_META(DRM_IOCTL_MODE_GETPROPERTY)
_BASIC_META(DRM_IOCTL_MODE_SETPROPERTY)
_BASIC_META(DRM_IOCTL_MODE_GETPROPBLOB)
_BASIC_META(DRM_IOCTL_MODE_GETFB)
_BASIC_META(DRM_IOCTL_MODE_ADDFB)
_BASIC_META(DRM_IOCTL_MODE_RMFB)
_BASIC_META(DRM_IOCTL_MODE_PAGE_FLIP)
_BASIC_META(DRM_IOCTL_MODE_DIRTYFB)

_BASIC_META(DRM_IOCTL_MODE_CREATE_DUMB)
_BASIC_META(DRM_IOCTL_MODE_MAP_DUMB)
_BASIC_META(DRM_IOCTL_MODE_DESTROY_DUMB)
_CUSTOM_META(DRM_IOCTL_MODE_GETPLANERESOURCES, DRM_IOWR(0xB5, FEX::HLE::x32::DRM::fex_drm_mode_get_plane_res))
_BASIC_META(DRM_IOCTL_MODE_GETPLANE)
_BASIC_META(DRM_IOCTL_MODE_SETPLANE)
_CUSTOM_META(DRM_IOCTL_MODE_ADDFB2, DRM_IOWR(0xB8, FEX::HLE::x32::DRM::fex_drm_mode_fb_cmd2))
_CUSTOM_META(DRM_IOCTL_MODE_OBJ_GETPROPERTIES, DRM_IOWR(0xB9, FEX::HLE::x32::DRM::fex_drm_mode_obj_get_properties))
_CUSTOM_META(DRM_IOCTL_MODE_OBJ_SETPROPERTY, DRM_IOWR(0xBA, FEX::HLE::x32::DRM::fex_drm_mode_obj_set_property))
_BASIC_META(DRM_IOCTL_MODE_CURSOR2)
_BASIC_META(DRM_IOCTL_MODE_ATOMIC)
_BASIC_META(DRM_IOCTL_MODE_CREATEPROPBLOB)
_BASIC_META(DRM_IOCTL_MODE_DESTROYPROPBLOB)

_BASIC_META(DRM_IOCTL_SYNCOBJ_CREATE)
_BASIC_META(DRM_IOCTL_SYNCOBJ_DESTROY)
_BASIC_META(DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD)
_BASIC_META(DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE)
_BASIC_META(DRM_IOCTL_SYNCOBJ_WAIT)
_BASIC_META(DRM_IOCTL_SYNCOBJ_RESET)
_BASIC_META(DRM_IOCTL_SYNCOBJ_SIGNAL)

_BASIC_META(DRM_IOCTL_MODE_CREATE_LEASE)
_BASIC_META(DRM_IOCTL_MODE_LIST_LESSEES)
_BASIC_META(DRM_IOCTL_MODE_GET_LEASE)
_BASIC_META(DRM_IOCTL_MODE_REVOKE_LEASE)

_BASIC_META(DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT)
_BASIC_META(DRM_IOCTL_SYNCOBJ_QUERY)
_BASIC_META(DRM_IOCTL_SYNCOBJ_TRANSFER)
_BASIC_META(DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL)

_CUSTOM_META(DRM_IOCTL_MODE_GETFB2, DRM_IOWR(0xCE, FEX::HLE::x32::DRM::fex_drm_mode_fb_cmd2))
_BASIC_META(DRM_IOCTL_SYNCOBJ_EVENTFD)
_BASIC_META(DRM_IOCTL_MODE_CLOSEFB)
